package com.xiaodeng.edu.pojo.dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDateTime;
@Data
public class AdminDto {
    private Integer id;//主键ID
    @Length(min = 6,max = 18,message = "管理员名长度必须是6-18位")
    private String adminUser;//用户名
    @Length(min = 6,max = 18,message = "密码长度必须是6-18位")
    private String password;//密码
    private String nickname;//昵称
    @Email(message = "邮箱格式错误")
    private String email;//邮箱
    private String adminPic;//管理员头像地址
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//更新时间
    @Pattern(regexp = "^\\S{3,10}$",message = "新密码长度必须为3-10位")
    private String newPwd;//新密码
}
